package cate.game.train.hero.msg;

import cate.common.annotation.OperationSetter;
import cate.common.table.d.GDOperation;
import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBTrain;
import easy.java.dev.note.NoteField;

@ClientMsg(title = "英雄重生 の 请求")
@OperationSetter(GDOperation.HERO_REBORN)
public class HeroRebornReq implements MsgInput {
    @NoteField(value = "英雄的唯一ID")
    public String uid;

    @Override
    public void execute(GameBody game, ClientContext cc) {
        game.train.hero.reborn(cc.getRole(),uid);
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBTrain.HERO_REBORN_REQ;
    }
}
